1 -- For partial block restrictions --
3 CREATE TABLE /*_*/ipblocks_restrictions (
4 ir_ipb_id
int NOT NULL CONSTRAINT FK_ir_ipb_id
FOREIGN KEY REFERENCES /*_*/ipblocks(ipb_id
) ON DELETE CASCADE,
5 ir_type tinyint
NOT NULL,
7 CONSTRAINT PK_ipblocks_restrictions
PRIMARY KEY (ir_ipb_id
, ir_type
, ir_value
)
8 ) /*$wgDBTableOptions*/;
10 -- Index to query restrictions by the page or namespace.
11 CREATE INDEX /*i*/ir_type_value
ON /*_*/ipblocks_restrictions (ir_type
, ir_value
);